package com.example.piggyframeworktest;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.ViewConfiguration;
import android.widget.Adapter;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.Scroller;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.MultiAutoCompleteTextView.CommaTokenizer;

public class ScrollLayoutChild extends com.piggy.framework.ui.layout.PiggyScrollLayout
{
	//private Context c;
	public ScrollLayoutChild(Context context, AttributeSet attrs) 
	{	
		super(context,attrs);
		//c=context;
		Log.e("chile", "child");
		Log.i("ScrollLayout", "ScrollLayout");
		//LoadResource();
	}

	public ScrollLayoutChild(Context context, AttributeSet attrs, int defStyle) 
	{		
		super(context, attrs, defStyle);
		//c=context;
		Log.i("ScrollLayout1", "ScrollLayout1");
		
		//LoadResource();
	}
	
	public void setAdapter(BaseAdapter ba)
	{
		adapter=ba;
	}
	
	//protected 
	

	
	/*
	@Override
	protected void LoadResource(Context c)
	{
		TextView tv=new TextView(c);
		tv.setText("text ok");		
		//addView(tv);
		LayoutInflater inflater = LayoutInflater.from(c);		
		LinearLayout l=(LinearLayout)inflater.inflate(R.layout.a1, null);
		
		View vv=(View)inflater.inflate(R.layout.a1, null);
		addView(vv);
		
		//LinearLayout layout=(LinearLayout)inflater.inflate(R.layout.child,null).findViewById(R.id.child_l1);
		LinearLayout l1=new LinearLayout(c);
		LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.FILL_PARENT);
		l1.setLayoutParams(lp);
		l1.addView(tv);
		
		View v=(View)l1;
		addView(v);
		
		LinearLayout l2=new LinearLayout(c);
		//LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.FILL_PARENT);
		l1.setLayoutParams(lp);
		TextView tv1=new TextView(c);
		tv1.setText("page 2");
		l2.addView(tv1);
		addView(l2);
	}*/

	}